home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Sound / Sound Utilities / The Sound-Tracker V1.0 / PSyn.h < prev    next >
Text File  |  1992-04-23  |  2KB  |  59 lines

  1.  
  2. /* PChannel.h - Header file for 'PSyn' resource */
  3.  
  4. /* Copyright © 1991 by Frank Seide, Koolbarg 39d, D-2000 Hamburg 74, Germany */
  5.  
  6. #ifndef __PCHANNEL__
  7. #define __PCHANNEL__
  8.  
  9. #ifndef __SOUND__
  10. #include "sound.h"
  11. #endif
  12.  
  13. typedef struct PChannel {
  14.  
  15.     /* Public part: */
  16.  
  17.     long unused0;
  18.     void (*userInit)();        /* Routine to (re-) init the SoundTrack interpreter */
  19.     int (*userPlay) (struct SoundTrack * soundTrack);    /* Perform one music step */
  20.     void (*userCompletion)();
  21.     long unused1;
  22.     void * userData;        /* Handle for SoundTrack interpreter */
  23.     Boolean playing;        /* Still playing ? (Use StopPChannel() to change) */
  24.     Boolean antiAlias;        /* Real time anti-aliasing on ? (May be changed always) */
  25.     Boolean stereo;        /* Stereo ? (Read only; use StereoPChannel() to change) */
  26.     Byte silence;
  27.     Byte echoFactor;
  28.     Boolean fadeOut;        /* Use StopPChannel (pc, TRUE) to fade out */
  29.     Byte unused2;
  30.     Fixed softFreq;            /* Reference sampling frequency used in calculations */
  31.     Fixed hardFreq;            /* Real sampling frequency (don´t change while playing!) */
  32.     long unused3;            /* (Do not use frequency values greater than $7fff.ffff!) */
  33.     Fixed mainVolume;        /* Main volume (use PChannelVolume() to change) */
  34.     int clipped;                /* Number of sample that had to be clipped */
  35.     int unused4;
  36.     Boolean userInited;    /* user    Init() already called ? (Use ResetPChannel() to clear) */
  37.     Boolean ossiBufEmpty;    /* Monitor buffer empty (Set by user, cleared by IRQ code) */
  38.     int ossiBufSize;        /* Size of monitor buffer (0, if none) */
  39.     Byte * ossiBuffer;        /* Pointer to monitor buffer (NULL, if none) */
  40.     
  41.     /* Private part follows here: */
  42.     
  43. } PChannel;
  44.  
  45. #define pr_SIZEOF 0xa0
  46.  
  47. /* Function prototypes: */
  48.  
  49. extern pascal Boolean CheckPChannel (struct PChannel * pc);
  50. extern pascal void StopPChannel (struct PChannel * pc, Boolean fadeOut);
  51. extern pascal void ClosePChannel (struct PChannel * pc);
  52. extern pascal void ResetPChannel (struct PChannel * pc);
  53. extern pascal OSErr OpenPChannel (int channels, Boolean stereo, int playFrames, struct PChannel ** pcp);
  54. extern pascal OSErr StartPChannel (struct PChannel * pc);
  55. extern pascal OSErr StereoPChannel (register struct PChannel * pc, Boolean stereo);
  56. extern pascal void PChannelVolume (struct PChannel * pc, int chan, Fixed volume);
  57. extern pascal int PChannelVersion();
  58.  
  59. #endif __PCHANNEL__